<?php 
if(isset($_SESSION['admindeal'])){
		echo '<script>
			window.location.assign("'.base_url('listdeal').'");
			</script>';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
	<title>Fashion Shop</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 	<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
 	<link rel="stylesheet" href="<?php echo base_url('css/default.css'); ?>">
	<script src="<?php echo base_url('js/jquery-1.9.1.js') ?>"  type="text/javascript"></script>
	<script src="<?php echo base_url('js/jquery.min.js') ?>"></script>

</head>

<body>

	<div id="header">
		<div class="header">
			<img src="<?php echo base_url('images/ad_logo.png')?>" style="margin:15px 0px;width: 180px;"/>
		</div>
		<div>
		
		</div>
	</div>

<script type="text/javascript">
	function loginAdmin () {
		var mInput = document.af;

		mInput.aid.value = mInput.aid.value.replace(/\s/g, "");

		if ( mInput.aid.value == "" ) {
			alert("이름을 입력하세요");
			return;
		}

		if ( mInput.apw.value == "" ) {
			alert("암호를 입력하세요");
			return;
		}

		mInput.submit();
	}

	$(document).ready(function(){

		$("#aid").keydown(function (e) {
			if (e.keyCode == 13) {                   
				$('#apw').focus();
				//alert('enter');
			}
		});

		$("#apw").keydown(function (e) {
			if (e.keyCode == 13) {                   
				loginAdmin();
			}
		});
	});
</script>

<div style="text-align:center;">
			<div class="login_area" style="border:0px red solid; margin:30px auto;">
				<div style="margin:0px auto; text-align:center;"><img src="<?php echo base_url('images/login_txtImg.png')?>"></div>
				<div id="DivloginSoho" >
					<FORM name="af" id="af" method="POST" action="<?=base_url('login/login_ok')?>">
					<table cellspacing="0" cellpadding="0" border="0" summary="관리자 로그인" style="margin:10px auto;">
						<!-- <caption>ë‚ ì”¨</caption> -->
						<colgroup>
							<col width="300px">
						</colgroup>
						<tbody>
							<tr>
								<td>
									<div class="contBox"><input name="aid" id="aid" type="text" autocomplete="off"></div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="contBox"><input name="apw" id="apw" type="password" value="" autocomplete="off"></div>
								</td>
							</tr>
						</tbody>
						<tfoot>
							<tr>
								<td><div class="divBtn" style="margin:0px 0px; border:none;" onclick="loginAdmin()"><img src="<?php echo base_url('images/login_Btn.png');?>" style=""></div></td>
							</tr>
						</tfoot>
					</table>
					</form>
				</div>
			</div>

</div>
</body>
</html>
